package com.artPreter.service.impl;


import com.artPreter.mapper.EventExhibitionMapper;
import com.artPreter.mapper.EventExhibitionTempMapper;
import com.artPreter.pojo.DepartTemp;
import com.artPreter.pojo.EventExhibition;
import com.artPreter.pojo.EventExhibitionTemp;
import com.artPreter.service.IEventExhibitionTempService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 活动展览模板内容表 服务实现类
 * </p>
 *
 * @author jarvis
 * @since 2025-01-06
 */
@Service
public class EventExhibitionTempServiceImpl extends ServiceImpl<EventExhibitionTempMapper, EventExhibitionTemp> implements IEventExhibitionTempService {


    @Override
    public EventExhibitionTemp getEventExhibitionTemp(EventExhibitionTemp eventExhibitionTempItem) {
        LambdaQueryWrapper<EventExhibitionTemp> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(EventExhibitionTemp::getEventId,eventExhibitionTempItem.getEventId());
        List<EventExhibitionTemp> list = this.baseMapper.selectList(lambdaQueryWrapper);
        if(list.size()>0){
            return list.get(0);
        }else{
            return null;

        }
    }
}
